#include <stdio.h>  
#include <math.h>  
  
int main() {  
    int n;  
    if (scanf("%d", &n));  
    for (int i = n; i > 1; i-- ) {  
        for (int j = 2; j < sqrt(i); j++)  
            if (!(i % j))  
                goto x;  
        printf("The max prime number is %d.\n", i);  
        break;  
x:  
        ;  
    }  
    return 0;  
}  